package com.ruoyi.bantong.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bantong.mapper.BtRedbagBlacklistMapper;
import com.ruoyi.bantong.domain.BtRedbagBlacklist;
import com.ruoyi.bantong.service.IBtRedbagBlacklistService;

/**
 * 红包玩法黑名单Service业务层处理
 * 
 * @author laohei
 * @date 2021-02-06
 */
@Service
public class BtRedbagBlacklistServiceImpl implements IBtRedbagBlacklistService 
{
    @Autowired
    private BtRedbagBlacklistMapper btRedbagBlacklistMapper;

    /**
     * 查询红包玩法黑名单
     * 
     * @param rbId 红包玩法黑名单ID
     * @return 红包玩法黑名单
     */
    @Override
    public BtRedbagBlacklist selectBtRedbagBlacklistById(Integer rbId)
    {
        return btRedbagBlacklistMapper.selectBtRedbagBlacklistById(rbId);
    }

    /**
     * 查询红包玩法黑名单列表
     * 
     * @param btRedbagBlacklist 红包玩法黑名单
     * @return 红包玩法黑名单
     */
    @Override
    public List<BtRedbagBlacklist> selectBtRedbagBlacklistList(BtRedbagBlacklist btRedbagBlacklist)
    {
        return btRedbagBlacklistMapper.selectBtRedbagBlacklistList(btRedbagBlacklist);
    }

    /**
     * 新增红包玩法黑名单
     * 
     * @param btRedbagBlacklist 红包玩法黑名单
     * @return 结果
     */
    @Override
    public int insertBtRedbagBlacklist(BtRedbagBlacklist btRedbagBlacklist)
    {
        btRedbagBlacklist.setCreateTime(DateUtils.getNowDate());
        return btRedbagBlacklistMapper.insertBtRedbagBlacklist(btRedbagBlacklist);
    }

    /**
     * 修改红包玩法黑名单
     * 
     * @param btRedbagBlacklist 红包玩法黑名单
     * @return 结果
     */
    @Override
    public int updateBtRedbagBlacklist(BtRedbagBlacklist btRedbagBlacklist)
    {
        btRedbagBlacklist.setUpdateTime(DateUtils.getNowDate());
        return btRedbagBlacklistMapper.updateBtRedbagBlacklist(btRedbagBlacklist);
    }

    /**
     * 批量删除红包玩法黑名单
     * 
     * @param rbIds 需要删除的红包玩法黑名单ID
     * @return 结果
     */
    @Override
    public int deleteBtRedbagBlacklistByIds(Integer[] rbIds)
    {
        return btRedbagBlacklistMapper.deleteBtRedbagBlacklistByIds(rbIds);
    }

    /**
     * 删除红包玩法黑名单信息
     * 
     * @param rbId 红包玩法黑名单ID
     * @return 结果
     */
    @Override
    public int deleteBtRedbagBlacklistById(Integer rbId)
    {
        return btRedbagBlacklistMapper.deleteBtRedbagBlacklistById(rbId);
    }
}
